package com.yvtian.pu.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yvtian.pu.dao.PuApplyForShopMapper;
import com.yvtian.pu.pojo.PuApplyForShopEntity;
import com.yvtian.pu.service.PuApplyForShopService;
import com.yvtian.utils.StringHelper;
import org.springframework.stereotype.Service;

/**
 * (pu_applyfor_shop)表服务实现类
 *
 * @author long
 * @since 2024-06-24 10:26:28
 */
@Service("puApplyforShopService")
public class PuApplyForShopServiceImpl extends ServiceImpl<PuApplyForShopMapper, PuApplyForShopEntity> implements PuApplyForShopService {

    @Override
    public IPage<PuApplyForShopEntity> findByPage(Page<PuApplyForShopEntity> page, PuApplyForShopEntity puApplyForShopEntity) {
        LambdaQueryWrapper<PuApplyForShopEntity> queryWrapper = new LambdaQueryWrapper<>();
        if (StringHelper.isNotEmpty(puApplyForShopEntity.getZcode())) {
            queryWrapper.eq(PuApplyForShopEntity::getZcode, puApplyForShopEntity.getZcode());
        }
        return this.page(page, queryWrapper);
    }
}

